//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package docker_dao

import "go.mongodb.org/mongo-driver/mongo"

var CateDao *_CateDao
var AppDao *_AppDao
var TemplateDao *_TemplateDao
var AppImageDao *_AppImageDao

func InitDao(mgoDb *mongo.Database) (err error) {
	CateDao, err = newCateDao(mgoDb)
	if err != nil {
		return
	}
	AppDao, err = newAppDao(mgoDb)
	if err != nil {
		return
	}
	TemplateDao, err = newTemplateDao(mgoDb)
	if err != nil {
		return
	}
	AppImageDao, err = newAppImageDao(mgoDb)
	if err != nil {
		return
	}
	return
}
